jQuery(document).ready(function() {
	jQuery('[name=filtrar]').click(function(e) {
		var data1 = jQuery('[name=data1]').val();
		var data2 = jQuery('[name=data2]').val();

		data1 = data1.split('/');
		data2 = data2.split('/');

		data1 = data1[0]+'-'+data1[1]+'-'+data1[2];
		data2 = data2[0]+'-'+data2[1]+'-'+data2[2];

		var url = String(window.location);

		url = url.split('/index');

		window.location.href = url[0]+'/index/data1:'+data1+'/data2:'+data2;
	});
});